import 'dart:convert';

import 'package:enterprise_v6_app/app/data/entities/application/basic_information/change_overhaul_record_entity.dart';
import 'package:enterprise_v6_app/generated/json/base/json_field.dart';
import 'package:enterprise_v6_app/generated/json/component_information_entity.g.dart';

export 'package:enterprise_v6_app/generated/json/component_information_entity.g.dart';

///部件/附件信息
@JsonSerializable()
class ComponentInformationEntity {
  ComponentInformationEntity();

  factory ComponentInformationEntity.fromJson(Map<String, dynamic> json) => $ComponentInformationEntityFromJson(json);

  ///	/年（更换周期）
  String? changeCycle = '';

  ///	/月（校验周期）
  String? checkCycle = '';

  ///	更换/校验记录
  List<ChangeOverhaulRecordEntity>? children = [];

  ///	企业编码
  String? companyCode = '';

  ///部件/副件名称
  String? componentName = '';

  ///	所用部件
  String? componentsUsed = '';

  ///	创建人姓名
  String? createBy = '';

  ///	创建人id
  String? createById = '';

  ///
  String? createDate = '';

  ///
  String? deleted = '';

  ///	设备Id
  String? deviceId = '';

  /// 部件类型（展示）
  String? deviceTypeName = '';

  /// 年（检定周期
  int? verificationCycle = 0;

  ///	设备名称
  String? deviceName = '';
  String? id = '';

  ///	制造厂家/原产地
  String? manufacturer = '';

  ///	备件号
  String? sparePartCode = '';

  ///	规格型号
  String? specsCode = '';

  /// 更换状态（0正常，1待更换）
  String? changeStatus = '';

  ///	校验状态（0正常，1待校验）
  String? checkStatus = '';

  ///	检定状态（0正常，1待检定）
  String? verificationStatus = '';

  ///	单位名称
  String? unitName = '';

  ///	最后更新人
  String? updateBy = '';

  ///	最后更新人id
  String? updateById = '';

  ///
  String? updateDate = '';

  Map<String, dynamic> toJson() => $ComponentInformationEntityToJson(this);

  @override
  String toString() {
    return jsonEncode(this);
  }
}
